<div class="box15">
	Залишити: 
		<?php $filters = array ('all' => Api_Select_Product::FILTER_ALL, 'new' => Api_Select_Product::FILTER_NEW, 'discount' => Api_Select_Product::FILTER_DISCOUNT, 'unavailable' => Api_Select_Product::FILTER_AVAL );?>
		<?php $translate = array ('all' => _ ( 'product-list filter all' ), 'new' => _ ( 'product-list filter new' ), 'discount' => 'зі знижкою', 'unavailable' => 'відсутній товар' );?>
		<?php foreach ( $filters as $filter => $fid ) {?>
			<?php if ($filter != 'all') {?>
				<img alt="<?php print $this->t($translate[$filter])?>" src="/image/layouts/<?php print $filter;?>.gif">
			<?php }?>		
			<a class="<?php print $filter; if ($fid == $this->filter) print ' selected'; ?>" href="<?php print $this->search ( array ('filter' => $fid ) )?>"><?php if ($fid == $this->filter) {?><span><?php print $this->t($translate[$filter])?></span><?php } else { print $this->t($translate[$filter]); }?></a>
		<?php }?>
</div>
<div class="box16">
	Впорядкувати: 
		<?php $sorts = array ('price' => Api_Select_Product::SORT_PRICE, 'name' => Api_Select_Product::SORT_NAME, 'author' => Api_Select_Product::SORT_AUTHOR, 'size' => Api_Select_Product::SORT_SIZE );
		if( isset( $this -> isAuthorPage ) ) { unset( $sorts['author'] ); }
		$translate = array ('price' => _ ( 'product-list sort price' ), 'name' => _ ( 'product-list sort name' ), 'author' => _ ( 'за автором' ), 'size' => _ ( 'за розміром' ) );
		foreach ( $sorts as $sort => $sid ) {
			if ($active = $sid == $this->sort)
				$is_asc = $this->is_asc ? '0' : '1';?>
			<?php if (!$active) {?>
				<a href="<?php print $this->search ( array ('sort' => $sid, 'is_asc' => '0' ) )?>"><?php print $this->t ( $translate [$sort] );?></a>
			<?php } else {?>
				<a class="selected <?php if ($this->is_asc && $sid == $this->sort) print 'desc'?>" href="<?php print $this->search ( array ('is_asc' => $is_asc ) )?>">
					<span><?php print $this->t ( $translate [$sort] )?>&nbsp
						<b class="<?php if ($this->is_asc && $sid == $this->sort) print 'desc'; else print 'undesc'?>">&nbsp&nbsp&nbsp</b>
					</span>
					
				</a>
			<?php }?>
		<?php }?>
</div>